﻿<div id="fb-root"></div>
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Facebook.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            InitialiseFacebook(@System.Configuration.ConfigurationManager.AppSettings["FacebookAppId"]);
        });
    </script>

@if (Request.IsAuthenticated) {
    <text>
        Hello, @User.Identity.Name
        @Html.ActionLink("Log off", "LogOff", "Account")
    </text>
} else {
    <ul>
        <li><fb:login-button autologoutlink="true" perms="read_friendlists, create_event, email, publish_stream"></fb:login-button></li>
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
